From 587a98aa02351b5a27145e92d3827a0945b70a41 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 18 Mar 2014 10:16:58 -0700 Subject: [PATCH] Lowered high lock timeout in mergeViaLock() and lock() in BagOStuff Change-Id: Ib5cd0a98ce6ec47edb24f8cc9f4df2c941ce1c38 --- includes/objectcache/BagOStuff.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/objectcache/BagOStuff.php b/includes/objectcache/BagOStuff.php index 4a27692f08..217142c0b4 100644 --- a/includes/objectcache/BagOStuff.php +++ b/includes/objectcache/BagOStuff.php @@ -142,7 +142,7 @@ abstract class BagOStuff { * @return bool success */ protected function mergeViaLock( $key, closure $callback, $exptime = 0, $attempts = 10 ) { - if ( !$this->lock( $key, 60 ) ) { + if ( !$this->lock( $key, 6 ) ) { return false; } @@ -168,7 +168,7 @@ abstract class BagOStuff { * @param $timeout integer [optional] * @return bool success */ - public function lock( $key, $timeout = 60 ) { + public function lock( $key, $timeout = 6 ) { $timestamp = microtime( true ); // starting UNIX timestamp if ( $this->add( "{$key}:lock", 1, $timeout ) ) { return true; -- 2.20.1